package com.producer.demo.component;

import java.util.Date;

import com.producer.demo.constant.MQConstant;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = MQConstant.HELLO_QUEUE_NAME)
public class ReceiverMessage {

	@RabbitHandler
	public void process(String content) {
		System.out.println("接受时间:"+ System.currentTimeMillis()/1000+":::::"+new Date());
		System.out.println("接受消息:" + content);
	}

}
